import { http } from '@/utils/request'
import type { FileUploadResponse } from '@/types/api'

// 文件上传
export const uploadFile = (file: File): Promise<FileUploadResponse> => {
  const formData = new FormData()
  formData.append('file', file)
  
  return http.upload('/api/v1/upload', formData)
}
